<!DOCTYPE html>
<html class="no-js" lang="en-US" prefix="og: http://ogp.me/ns#">

<head>
	<meta charset="UTF-8" />
	<meta content="AA支付,老牛支付,<858887906@qq.com>" name="Keywords">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>登录后台 - {:config('basic.title')}</title>
	<link href="/static/css/bootstrap.3.css" type="text/css" rel="stylesheet">
	<link href="/static/css/base_cwn.css" type="text/css" rel="stylesheet">
	<style>
		html,
		body {
			height: 100%;
			width: 100%;
			min-width: 100%;
			position: relative;
		}
	</style>
</head>

<body class="bgimg" style="background: url(/static/img/bg.jpg) center no-repeat;background-size: 100% 100%;">
	<div class="loginbox clearfix" style="background: url(/static/img/card.jpg) left center no-repeat #fff;">
		<div class="lo_left fl">
			<h4 class="f30"><img src="/static/img/ln.svg"> </h4>
		</div>
		<div class="lo_right fr">
			<h2 class="f30 ">管理后台</h2>
			<h3 class="f18">请登录您的账号</h3>
			<div class="login_form">
				<div class="media p15 bb">
					<div class="media-left media-middle">
						<img class="media-object" src="/static/img/lo_u.svg" alt="...">
					</div>
					<div class="media-body media-middle pl10">
						<h4 class="zh_t">管理账号 <span id="usernameDes" class="red"></span></h4>
						<input type="text" name="username" class="form_lo" placeholder="用户名">
					</div>
				</div>
				<div class="media p15 bb">
					<div class="media-left media-middle">
						<img class="media-object" src="/static/img/lo_pas.svg" alt="...">
					</div>
					<div class="media-body media-middle pl10">
						<h4 class="zh_t">登录密码 <span id="passwdDes" class="red"></span></h4>
						<input type="password" name="password" class="form_lo" placeholder="密码">
					</div>
				</div>
			</div>
			<!--<p class="t_r pt20"><a href="#" class="blue1">忘记密码</a></p>-->
			<div class="pt20">
				<input type="button" id="submitForm" value="登录" class="btn btn_lo f16 btn-block">
			</div>
			<input type="hidden" id="token" name="__token__" value="94f90462d6d5b7bb359f13ff51209a73" />
		</div>
	</div>

	<script src="/static/js/jquery.min.js"></script>
	<script>
		$(function () {
			// 登录按钮
			$('#submitForm').click(function () {
				submitForm();
			});

			// 绑定回车事件
			document.onkeyup = function (e) {
				e = e || window.event;
				if (e.keyCode == 13) {
					submitForm();
				}
			};

			// 提交
			function submitForm() {
				var data = {
					username: $("input[name='username']").val(),
					password: $("input[name='password']").val()
				}
				console.log(data)
				$.post('', data, function (res) {
					alert(res.msg)
					if(res.code==1){
						location.href = res.url
					}
				})
				return false;
			}
		});

	</script>
</body>

</html>